<?php
namespace app\index\Controller;

// 后台共用文件，写得有点乱啊。请多多包涵吧。
use think\Controller;

class Common extends Controller {
	function _initialize() {

		import('ORG.Net.UploadFile');
		import("ORG.Util.Category");
		$this->assign('webtitle',config('web_title'));
		if (isset($_SESSION['admin_key'])){
			$this->redirect(U('Public/login'));
		}

		$Articlecat=db('Article_cat');
		$leftlist=$Articlecat->limit(4)->order('acid desc')->select();
		$this->assign('leftlist',$leftlist);
		$Pages=db('Pages');
		$pageslist=$Pages->limit(7)->order('pagid desc')->select();

		$this->assign('pageslist',$pageslist);

	}
}